package com.fengsir;

import com.fengsir.brand.Ford;
import com.fengsir.car.Car;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.FileSystemXmlApplicationContext;

/**
 * @author fengzeng
 * @create 2021/4/27 13:54
 */
public class CarApp {
  public static void main(String[] args) {
    ApplicationContext ctx =
        new FileSystemXmlApplicationContext("src/main/resources/applicationContext.xml");
    Car car = (Car) ctx.getBean("Car");
    car.setBrand(new Ford());
    System.out.println("brand:" + car.getBrand().brand());

  }
}
